<template>
  <div class="my">
    <header>
      <div class="bd">
        <div class="left" @click="goBack">
          <van-icon name="arrow-left" size="20" />
        </div>
        <h2>个人中心</h2>
        <div class="right" @click="goPath">
          <van-icon name="home-o" size="20" />
        </div>
      </div>
      <div class="nologin">
        <span  @click="goLogin">登录/注册</span>
      </div>
    </header>
    <div class="my-item" v-for="item in 4" :key="item">
      <h1>个人中心</h1>
      <ul>
        <li v-for="i in 4" :key="i">
          <van-icon name="friends-o"  size="27"  color="#ff7e45"/>
          <div class="right">
            <span>我的拼团</span>
            <van-icon name="arrow" />
          </div>
        </li>
      </ul>
    </div>
    <Tabbar />
  </div>
</template>

<script>
import Tabbar from "@/components/common/Tabbar.vue";
export default {
  components: {
    Tabbar,
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    },
    goPath() {
      this.$router.push("/");
    },
    goLogin() {
      this.$router.push('/login')
    }
  },
};
</script>

<style lang="less" scoped>
.my {
  background: #f5f5f5;
  font-size: 14px;
  header {
    .bd {
      background: #b0352f;
      position: fixed;
      height: 44px;
      top: 0;
      left: 0;
      z-index: 99;
      width: 100%;
      max-width: 640px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: #fff;
      h2 {
        font-weight: 400;
      }
      .left,
      .right {
        width: 34px;
        height: 34px;
        margin: 5px;
        display: flex;
        justify-content: center;
        align-items: center;
      }
    }
    .nologin {
      margin-top: 44px;
      height: 110px;
      background: #b0352f;
      display: flex;
      align-items: center;
      justify-content: center;
      span {
        background: rgba(255, 181, 0, 0.9);
        padding: 5px 20px;
        color: #fff;
        border-radius: 5px;
        font-size: 15px;
      }
    }
  }
  .my-item {
    background: #fff;
    margin-bottom: 10px;
    h1 {
      height: 44px;
      line-height: 44px;
      padding: 0 12px;
      color: #9e9e9e;
      font-weight: 400;
      font-size: 14px;
      border: 1px solid #e3e5e9;
    }
    ul {
      li {
        height: 44px;
        display: flex;
        padding: 0 12px;
        align-items: center;
        .right {
          flex: 1;
          margin-left: 10px;
          height: 44px;
          display: flex;
          justify-content: space-between;
          align-items: center;
          border-bottom: 1px solid #e3e5e9;
        }
      }
    }
  }
}
</style>